import request from '@/utils/request'

// 查询课程主讲人/助教列表
export function listSpeakers(query) {
  return request({
    url: '/teach/speakers/list',
    method: 'get',
    params: query
  })
}

// 查询课程主讲人/助教详细
export function getSpeakers(id) {
  return request({
    url: '/teach/speakers/' + id,
    method: 'get'
  })
}

// 新增课程主讲人/助教
export function addSpeakers(data) {
  return request({
    url: '/teach/speakers',
    method: 'post',
    data: data
  })
}

// 修改课程主讲人/助教
export function updateSpeakers(data) {
  return request({
    url: '/teach/speakers',
    method: 'put',
    data: data
  })
}

// 删除课程主讲人/助教
export function delSpeakers(id) {
  return request({
    url: '/teach/speakers/' + id,
    method: 'delete'
  })
}
